package com.itheima.service.impl;

import com.itheima.domain.Role;
import com.itheima.mapper.RoleMapper;
import com.itheima.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServiceImpl implements RoleService {

    @Autowired
    private RoleMapper roleMapper;

    public List<Role> list() {
        List<Role> roleList = roleMapper.findAll();
        int i = 1/0;
        return roleList;
    }

    public void save(Role role) {
        roleMapper.save(role);
    }
}
